#
# pH+ Template
#

module Ph

  class Template
    
    attr_accessor :template
    
    def initialize(template='')
      @template = template
    end
  
    
    def generate(collection)
      
      template = @template.to_s
      collection.each { |key, value| template.sub!("{" + key.to_s + "}", value.to_s) }
      
      return template
    end
  
  end
  
end
